<div class="waypoint container contact">
    <div class="row">

        <div class="col-md-12">
            <h2 class="page-title">Editar Empresa</h2>
        </div>
        
        <div class="col-md-12">
            <ol class="breadcrumb">
                <li><a href="<?php echo $this->url(array('controller' => 'admin', 'action' => 'index'))?>">Admin</a></li>
                <li>Editar Empresas</li>
            </ol>
        </div>
        
        <div class="col-md-12">
            <div id="contact">
                <form action="<?php echo $this->url(array('controller' => 'admin', 'action' => 'editar-empresas', 'company' => $this->company['id'])) ?>" method="post" id="company-form" enctype="multipart/form-data">
                    <input type="hidden" name="logoOld" id="logoOld" value="<?php echo $this->company['logo']; ?>">
                    <div class="row">
                        <div class="col-md-12">
                            <label for="name"> Nome da empresa*: </label><input type="text" required name="name" id="name" value="<?php echo $this->company['name']; ?>" /> 
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-5">
                            <label for="site"> Site: </label><input type="text" placeholder="http://" name="site" id="site" value="<?php echo $this->company['site']; ?>" /> 
                        </div>
                        <div class="col-md-2">
                            <label for="size" data-toggle="tooltip" title="Número aproximado de funcionários"> Num. de funcionários*: </label>
                            <select style="font-size: 13px" required name="size" id="size" > 
                                <option value="1 - 10" <?php if ($this->company['size'] == '1 - 10') echo 'selected'; ?>>1 - 10</option>
                                <option value="10 - 50" <?php if ($this->company['size'] == '10 - 50') echo 'selected'; ?>>10 - 50</option>
                                <option value="50 - 100" <?php if ($this->company['size'] == '50 - 100') echo 'selected'; ?>>50 - 100</option>
                                <option value="100 - 500" <?php if ($this->company['size'] == '100 - 500') echo 'selected'; ?>>100 - 500</option>
                                <option value="500 - 1.000" <?php if ($this->company['size'] == '500 - 1.000') echo 'selected'; ?>>500 - 1.000</option>
                                <option value="1.000 - 3.000" <?php if ($this->company['size'] == '1.000 - 3.000') echo 'selected'; ?>>1.000 - 3.000</option>
                                <option value="3.000 - 5.000" <?php if ($this->company['size'] == '3.000 - 5.000') echo 'selected'; ?>>3.000 - 5.000</option>
                                <option value="5.000+" <?php if ($this->company['size'] == '5.000+') echo 'selected'; ?>>5.000+</option>
                                <option value="10.000+" <?php if ($this->company['size'] == '10.000+') echo 'selected'; ?>>10.000+</option>
                                <option value="30.000+" <?php if ($this->company['size'] == '30.000+') echo 'selected'; ?>>30.000+</option>
                            </select>
                        </div>
                        <div class="col-md-5">
                            <label for="category" data-toggle="tooltip" title="Qual o ramo de atuação da empresa?"> Categoria*: </label>
                            <select name="category" id="category">
                            <?php 
                                foreach ($this->categories AS $key => $value) {
                                    if ($this->company['category_id'] == $key) {
                                        echo '<option value="'.$key.'" selected>'. $value .'</option>';
                                    } else {
                                        echo '<option value="'.$key.'">'. $value .'</option>';
                                    }
                                } 
                            ?>
                            </select>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <label for="logo"> Logo da empresa: </label><input type="file" name="logo" id="logo" /> 
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <label for="description"> Descrição: </label>
                            <textarea name="description" id="description" cols="30" placeholder="Breve descrição da empresa" rows="10"><?php echo $this->company['description']; ?></textarea>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12 center" style="width: 100%; text-align: center">
                            <input name="submit" type="submit" class="btn btn-large blue-color" id="submit" value="Avançar" />
                            <a href="<?php echo $this->url(array('controller' => 'admin', 'action' => 'empresas')) ?>" class="btn btn-large red-color"> Cancelar <a/>
                        </div>
                    </div>
                </form>
            </div><!-- end #contact -->

        </div><!-- end .col-md-12 -->

    </div><!-- end .row -->
</div><!-- end section -->
<script type="text/javascript">
    $( document ).ready(function() {
        $('label').tooltip();
    });
</script>